import request from '@/utils/request'
import type { Student, ListParams, PageResult } from '@/types/student'

export const getStudents = (params: ListParams) => 
  request.get('/students/', { params })

export const createStudent = (data: Student) => 
  request.post('/students/', data)

export const updateStudent = (id: number, data: Student) => 
  request.put(`/students/${id}/`, data)

export const deleteStudent = (id: number) => 
  request.delete(`/students/${id}/`)